<?php

use Illuminate\Routing\Router;

Admin::registerAuthRoutes();

Route::group([
    'prefix'        => config('admin.route.prefix'),
    'namespace'     => config('admin.route.namespace'),
    'middleware'    => config('admin.route.middleware'),
], function (Router $router) {

    $router->get('/', 'HomeController@index')->name('admin.home');

    //用户列表
    $router->resource('/user', 'UserController');

    //供应商列表
    $router->resource('/supplier', 'SupplierController');

    //用户身份审核列表
    $router->post('/user_partner/partner', 'UserPartnerController@partner');
    $router->resource('/user_partner', 'UserPartnerController');

    // 短信模板
    $router->resource('/sms_template', 'MessageTemplateController');

    // 短信列表
    $router->resource('/sms', 'MessageController');

    //文章路由
    $router->resource('/article', 'ArticleController');

    //报价路由
    $router->resource('/quotation_sheet', 'QuotationSheetController');

    //子订单列表
    $router->resource('/order_phone', 'OrderPhoneController');

    //订单路由
    //待收货订单
    $router->post('/wait_orders/receiving', 'WaitOrdersController@receiving');
    $router->resource('/wait_orders', 'WaitOrdersController');

    //初审订单
    $router->post('/trial_orders/fully', 'TrialOrdersController@fully');
    $router->post('/trial_orders/recheck', 'TrialOrdersController@recheck');
    $router->resource('/trial_orders', 'TrialOrdersController');

    //复审订单
    $router->post('/recheck_orders/recheck_confirmed', 'RecheckOrdersController@RecheckConfirmed');
    $router->resource('/recheck_orders', 'RecheckOrdersController');

    //待确认订单
    $router->post('/confirmed_orders/whole', 'ConfirmedOrdersController@whole');
    $router->resource('/confirmed_orders', 'ConfirmedOrdersController');

    //已确认
    $router->post('/acknowledged_orders/achieve', 'AcknowledgedOrdersController@achieve');
    $router->post('/acknowledged_orders/remit_cancel', 'AcknowledgedOrdersController@RemitCancel');
    $router->post('/acknowledged_orders/to_cancel', 'AcknowledgedOrdersController@ToCancel');
    $router->post('/acknowledged_orders/to_remit', 'AcknowledgedOrdersController@ToRemit');
    $router->resource('/acknowledged_orders', 'AcknowledgedOrdersController');

    //已完成订单
    $router->resource('/stocks_orders', 'StocksOrdersController');

    $router->resource('/phone', 'PhoneController');

    $router->resource('/brought_membranes', 'BroughtMembraneController');

    $router->resource('/logistics_companys', 'LogisticsCompanysController');

    $router->resource('/configuration', 'ConfigurationController');

    $router->resource('/to_show', 'ShowController');
});
